<%@ taglib uri="/WEB-INF/struts-html.tld"  prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld"  prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-nested.tld"  prefix="nested"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean"%>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<%@ page import="com.scalar.chiptrack.utils.ConfigManager,
                 com.scalar.forecast.commons.Constants"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<chiptrack:checkLogon sourcePage="/forecastSetup.do"/>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
<META content="" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">

<SCRIPT language=JavaScript>
function onSubmit( actionName )
{
    var form = document.forecastSetupForm;
    if ( actionName == null || typeof actionName == 'undefined' )
    {
        form.action="forecastSetup.do?action=new"
    }
    else
    {
        form.action="forecastSetup.do?action=" + actionName;
    }
    form.submit();
}
</SCRIPT>

<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->
<INPUT type=hidden name=action>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width=180 background=<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif>
    <!-- Side Navigation start -->
      <%@ include file="/jsp/marketing/marketing_menu.jsp" %>
    <!-- end of the side navigations --></TD>
    <TD bgColor=#ffffff><IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"
      width=8></TD>
    <TD bgColor=#ffffff><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"
      width=2></TD>
    <TD vAlign=top width="100%"><IMG height=1
      src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0> <BR>
      <CENTER><SPAN class=NArialW>Forecast Setup</SPAN></CENTER><IMG height=20
      src="<%=chipTracContext%>/jsp/includes/images/spacer.gif">
      <TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0>
        <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0>
              <TBODY>
              <%--<TR>
                <TD>&nbsp;</TD></TR>--%>
              <TR>
                <TD>
<html:form action="/forecastSetup" name="forecastSetupForm" type="com.scalar.forecast.forecastSetup.forms.ForecastSetupForm" scope="session">

                  <TABLE cellSpacing=0 cellPadding=0 width="621" align=center
                  border=0>
                    <TBODY>
                    <logic:equal name="showEditConfirmButton" value="true" scope="request">
                        <TR>
                            <TD colspan='5' align="right">
                                <A href="javascript:onSubmit('edit');"><IMG onmouseover="window.status='Click here to Edit Forecast Setup';return true" title="Click here to Edit Forecast Setup " src="<%=chipTracContext%>/jsp/includes/images/edit.gif" border=0 ></A> &nbsp;&nbsp;&nbsp;&nbsp;
                                <A href="javascript:onSubmit('confirm');"><IMG onmouseover="window.status='Click to Save Forecast Setup Information';return true" title="Click to Save Forecast Setup Information" onmouseout="window.status='';return true" src="<%=chipTracContext%>/jsp/includes/images/confirm.gif" border=0></A>
                            </TD>
                        </TR>
                    </logic:equal>
                    <TR><TD colspan='5'>&nbsp;</TD></TR>
                    <TR><TD colspan='5' id='errorMessagesId'><chiptrack:errors styleClass='NArialL' /></TD></TR>
                    <TR><TD colspan='5' id='infoMessagesId'><chiptrack:info styleClass='NArialL' /></TD></TR>
                    <TR>
                      <TD align=left bgColor=#993333 colSpan=5 width="621"  height="16"><FONT
                        class=NArialL><FONT color=#ffffff>&nbsp;Forecast Entry Setup
                        </FONT></FONT></TD></TR>
                    <TR>
                      <TD colSpan=5 width="621">&nbsp;</TD></TR>
                    <TR>
                      <TD width="27">&nbsp;</TD>
                      <TD colspan="4" align="left" width="594" nowrap>
                        <nested:equal property="byProduct" value="true">
                            <nested:hidden property="byProduct"/>
                            <FONT class=NArialL>By Product</FONT>
                        </nested:equal>
                        <nested:equal property="byCustomer" value="true">
                            <nested:hidden property="byCustomer"/>
                            <FONT class=NArialL>/ By Customer</FONT>
                        </nested:equal>
                        <nested:equal property="byProject" value="true">
                            <nested:hidden property="byProject"/>
                            <FONT class=NArialL>/ By Project</FONT>
                        </nested:equal>
                        <nested:equal property="byOdm" value="true">
                            <nested:hidden property="byOdm"/>
                            <FONT class=NArialL>/ By <bean:message key="label.sales.endCustomer"/></FONT>
                        </nested:equal>
                      </TD>
                    </TR>
                    </TBODY>
                </TABLE>
               </TD>
              </TR>
              <TR>
                <TD>&nbsp;</TD></TR>
              <TR>
                <TD>&nbsp;</TD></TR>
              <TR>
                <TD>
                  <TABLE cellSpacing=0 cellPadding=0 width="629" align=center
                  border=0>
                    <TBODY>
                    <TR>
                      <TD align=left bgColor=#993333 colSpan=6 width="625"  height="16"><FONT
                        class=NArialL><FONT color=#ffffff>&nbsp;Timeframe Setup
                        </FONT></FONT></TD></TR>
                    <TR>
                      <TD colSpan=6 width="625">&nbsp;</TD>
					</TR>
                    <TR>
                      <TD width="66">&nbsp;</TD>
                      <TD colspan="4" colwidth="412" nowrap width="250">
                        <FONT class=NArialL>Timeframe Selected:&nbsp;
                            <nested:hidden property="tfName"/>
                            By <nested:write property="tfName"/></FONT>
                      </TD>
                      <TD width="315" nowrap><FONT class=NArialL>&nbsp;Freezing
                        Point:&nbsp;</FONT><FONT class=NArialL>
                        <nested:hidden property="tfCompany"/>
                        <nested:write property="tfCompany"/>
                        &nbsp;  <nested:hidden property="tfMeasureType"/>
                                <nested:equal property="tfMeasureType" value="<%=Constants.MEASURE_TYPE_DAYS%>" >Days</nested:equal>
                                <nested:equal property="tfMeasureType" value="<%=Constants.MEASURE_TYPE_WEEKS%>" >Weeks</nested:equal>
                                <nested:equal property="tfMeasureType" value="<%=Constants.MEASURE_TYPE_MONTHS%>" >Months</nested:equal>
                        </FONT>
                      </TD>
					 </TR>

				  	</TBODY></TABLE></TD></TR>
              <TR>
                <TD>&nbsp;</TD></TR>
              <TR>
                <TD>&nbsp;</TD></TR>
              <TR>
                <TD>
                  <TABLE cellSpacing=1 cellPadding=0 width="629" align=center
                  border=0>
                    <TBODY>
                    <TR>
                      <TD align=left bgColor=#993333 colSpan=6 width="621"  height="16"><FONT
                        class=NArialL><FONT color=#ffffff>&nbsp;Levels Selected:
                        </FONT></FONT></TD></TR>
                    <TR>
                      <TD colSpan=6 width="621">&nbsp;</TD></TR>
                    <TR>
                      <TD width="18">&nbsp;</TD>
                      <TD width="9">&nbsp;</TD>
                      <TD width="191" align="center" bgColor="#DEE1E2"><font class="NArialL"> Level Name</font></TD>
                      <TD width="86" align="center" bgColor="#DEE1E2"><font class="NArialL"> Level Order</font></TD>
                      <TD width="57">&nbsp;</TD>
                      <TD width="261">&nbsp;</TD></TR>

                   <nested:root name="forecastSetupForm">
                   <nested:iterate name="forecastSetupForm" property="levels" indexId="idx"  id="levelBean" type="com.scalar.forecast.forecastSetup.LevelBean">
                      <nested:equal property="selected" value="true">
                        <TR>
                          <TD width="16">&nbsp;</TD>
                          <TD width="9">&nbsp;</TD>

                          <TD width="211" nowrap>
                            <nested:hidden property="selected"/>
                            <FONT class=NArialL>
                                 &nbsp;
                                <nested:hidden property="levelName"/>
                                <nested:write name="levelBean" property="levelName" />
                            </FONT>
                          </TD>
                          <TD width="86" align="center">
                            <FONT class=NArialL>
                                <nested:hidden property="levelOrder"/>
                                <nested:write name="levelBean" property="levelOrder" />
                            </FONT>
                          </TD>
                          <TD width="57">&nbsp;</TD>
                          <TD width="261">&nbsp;</TD>
                        </TR>
                      </nested:equal>
                      <nested:notEqual property="selected" value="true">
                        <nested:hidden property="selected"/>
                        <nested:hidden property="levelName"/>
                        <nested:hidden property="levelOrder"/>
                      </nested:notEqual>
                  </nested:iterate>
                  </nested:root>

                    <TR id="newRowId">
                      <TD width="18">&nbsp;</TD>
                      <TD width="8">&nbsp;</TD>
                      <TD width="191">&nbsp;</TD>
                      <TD width="86">&nbsp;</TD>
                      <TD width="57">&nbsp;</TD>
                      <TD align=right width="261">&nbsp;</TD></TR>
                   </TBODY>
                   </TABLE>
                </TD>
              </TR>
              <TR>
                <TD>&nbsp;</TD></TR>

			  <!-------------------------------------------------------------->
			  <TR>
                <TD>
                  <TABLE cellSpacing=0 cellPadding=0 width="629" align=center
                  border=0>
                    <TBODY>
                    <TR>
                      <TD align=left bgColor=#993333 colSpan=6 width="621"  height="16"><FONT
                        class=NArialL><FONT color=#ffffff>&nbsp;Forecast Entry Fields Selected:
                        </FONT></FONT></TD></TR>
                    <TR>
                      <TD colSpan=6 width="621">&nbsp;</TD></TR>
              <nested:iterate property="forecastEntryFields" indexId="idx" id="entryFields">
               <nested:equal property="entrySelected" value="true">
                    <TR>
                      <TD width="17">&nbsp;</TD>
                      <TD width="10">&nbsp;</TD>
                      <TD width="516">
                        <nested:hidden property="entrySelected"/>
                        <FONT class=NArialL>
                            <nested:hidden property="entryName"/>
                            &nbsp;&nbsp;<nested:write property="entryName"/></FONT>
                      </TD>
                      <TD width="26">&nbsp;</TD>
                      <TD width="26">&nbsp;</TD>
                      <TD width="27">&nbsp;</TD></TR>
               </nested:equal>
               <nested:notEqual property="entrySelected" value="true" >
                    <nested:hidden property="entrySelected"/>
                    <nested:hidden property="entryName"/>
               </nested:notEqual>
              </nested:iterate>
                    <TR>
                      <TD width="18">&nbsp;</TD></TR>
				</TBODY>
				</TABLE>
			</TD>
		</TR>
			  <!-------------------------------------------------------------->
		  <TR>
			<TD>&nbsp;</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR><BR></TD>
    <TD bgColor=#ffffff><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"
      width=1></TD></TR>
</html:form>
<!-- Footer starts here -->

<%@ include file="/jsp/includes/footer.jsp" %>

</table>

<!-- footer end here -->
</BODY></HTML>